The objective of this application is to create an interesting educational environment by combining virtual reality and gamification ideas to see how they both help users remember important facts. The key goal of this implementation is to help people with nyctophobia overcome their fear of the dark. in group of 3, my main roles were AI Programmer and Core Developer. As AI developer I was responsible for the design and implementation of simple AI robot behaviour. As a Core Developer I was responsible for graphics and performance optimizations, design and implementation of gameplay message system and creation of specific materials for various ingame items.
There was a huge design discussion on how the robot can deal with the player. After several pre-design discussions with the team, we settled on with having it as a ingame support. It will help in finding items, help in switching lights on/off, help in calming down the player and help in interacting with pickups. The robot will stay with us during the whole gameplay. The robot will also control the HUD which means that if the character would like to change the levels, he can interact with the robot to change do so.
Robot class is derived from a default UE4 Pawn class. It provides an access to the basic movement components and allows the use of navmesh for navigating around the game world. The character class would be also a good choice, however it has the Skeletal Mesh Component attached by default and we needed only a static mesh for the robot's visual representation.
The Robot's movement behaviour have been implemented in it's AI Controller class and the interaction with messages system has been implemented in its Pawn blueprint class.
It is a crucial element in communication with the player. It is also the only source of knowledge and support for the user. Robot has been designed and implemented to not do any rushed moves that could distract or cause fear to the user. Its purpose is solely related to make the player more confident and to provide the high level of support.
All key interactible items can be highlighted by using a special post process material which highlights the 3d mesh edges with emissive color of choice. Weapons
I have created the base class EnemyWeaponBase. From this class I have help to create inherited weapon type: BlitzWeaponTest. It is a base class for EnemyBlitzWeapon,PistolWeapon and AssaultRifleWeapon. Weapons and Bullets have a Boolean isPlayerBullet. It is used to check during the collision event who should take damage and should bullet be destroyed in collision with the collider. For example we do not want to destroy a bullet which has been created from the player's weapon in collision with the player.
Gameplay Messages System allows the injection and rendering of custom messages on the screen. The key element of the system is Text Display Manager class which responsible for managing the input and the output messages. The manager is a class derived from an Actor class. The instance of it should be created in the level in which the messaging functionaloty will be used. UI
I helped to create the HUD for the Player. The code for the HUD is placed inside the GameStateTest class so that it is also inherited by all the game levels. I used Text pointers to create instances of the text and to be able to easily clear the memory dynamically. The new pointers for each text (enemies left, coins, lives and ammo) are being created and destroyed each frame.
Any other class can access the manager by using the Get Test Display Manager function implemented in a Blueprint Helper Functions class which is a set of useful functions available globally. The custom messages in form of a text variable and a set of custom properties such as delay, display duration, priority etc. Manager can take an array of messages as an input.
The array is a core container that stores awaiting messages. The element at index 0 is processed first. Then, it is removed and another element at index 0 is processed. This process is repeated until an array of message requests is empty. Each new message that has been requested by other classes will be added at the end of the array.
The element positions can change based on their priority (ie. a new message with priority 0 will be placed before the elements with higher priority values). This system can be easily added to any other UE4 project.